3.50 \(\int \sin ^2(a+\frac{1}{4} i \log (c x^2)) \, dx\)

Optimal. Leaf size=53 \[ -\frac{e^{-2 i a} c x^3}{8 \sqrt{c x^2}}-\frac{e^{2 i a} x \log (x)}{4 \sqrt{c x^2}}+\frac{x}{2} \]

[Out]

x/2 - (c*x^3)/(8*E^((2*I)*a)*Sqrt[c*x^2]) - (E^((2*I)*a)*x*Log[x])/(4*Sqrt[c*x^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0452294, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {4483, 4489} \[ -\frac{e^{-2 i a} c x^3}{8 \sqrt{c x^2}}-\frac{e^{2 i a} x \log (x)}{4 \sqrt{c x^2}}+\frac{x}{2} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + (I/4)*Log[c*x^2]]^2,x]

[Out]

x/2 - (c*x^3)/(8*E^((2*I)*a)*Sqrt[c*x^2]) - (E^((2*I)*a)*x*Log[x])/(4*Sqrt[c*x^2])

Rule 4483

Int[Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[x
^(1/n - 1)*Sin[d*(a + b*Log[x])]^p, x], x, c*x^n], x] /; FreeQ[{a, b, c, d, n, p}, x] && (NeQ[c, 1] || NeQ[n,
1])

Rule 4489

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Dist[(m + 1)^p/(2^p*b^p*d^p*p^p)
, Int[ExpandIntegrand[(e*x)^m*(E^((a*b*d^2*p)/(m + 1))/x^((m + 1)/p) - x^((m + 1)/p)/E^((a*b*d^2*p)/(m + 1)))^
p, x], x], x] /; FreeQ[{a, b, d, e, m}, x] && IGtQ[p, 0] && EqQ[b^2*d^2*p^2 + (m + 1)^2, 0]

Rubi steps

\begin{align*} \int \sin ^2\left (a+\frac{1}{4} i \log \left (c x^2\right )\right ) \, dx &=\frac{x \operatorname{Subst}\left (\int \frac{\sin ^2\left (a+\frac{1}{4} i \log (x)\right )}{\sqrt{x}} \, dx,x,c x^2\right )}{2 \sqrt{c x^2}}\\ &=-\frac{x \operatorname{Subst}\left (\int \left (e^{-2 i a}+\frac{e^{2 i a}}{x}-\frac{2}{\sqrt{x}}\right ) \, dx,x,c x^2\right )}{8 \sqrt{c x^2}}\\ &=\frac{x}{2}-\frac{c e^{-2 i a} x^3}{8 \sqrt{c x^2}}-\frac{e^{2 i a} x \log (x)}{4 \sqrt{c x^2}}\\ \end{align*}

Mathematica [A]  time = 0.0995453, size = 60, normalized size = 1.13 \[ \frac{x \left (i \sin (2 a) \left (c x^2-2 \log (x)\right )-\cos (2 a) \left (c x^2+2 \log (x)\right )+4 \sqrt{c x^2}\right )}{8 \sqrt{c x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + (I/4)*Log[c*x^2]]^2,x]

[Out]

(x*(4*Sqrt[c*x^2] - Cos[2*a]*(c*x^2 + 2*Log[x]) + I*(c*x^2 - 2*Log[x])*Sin[2*a]))/(8*Sqrt[c*x^2])

________________________________________________________________________________________

Maple [B]  time = 0.069, size = 173, normalized size = 3.3 \begin{align*}{ \left ({\frac{x}{4}}+{\frac{5\,x}{2} \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{2}}+{\frac{x}{4} \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{4}}-{\frac{x\ln \left ( c{x}^{2} \right ) }{8}}+{\frac{3\,x\ln \left ( c{x}^{2} \right ) }{4} \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{2}}-{\frac{x\ln \left ( c{x}^{2} \right ) }{8} \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{4}}-{\frac{i}{2}}x\ln \left ( c{x}^{2} \right ) \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) +{\frac{i}{2}}x\ln \left ( c{x}^{2} \right ) \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{3} \right ) \left ( 1+ \left ( \tan \left ({\frac{a}{2}}+{\frac{i}{8}}\ln \left ( c{x}^{2} \right ) \right ) \right ) ^{2} \right ) ^{-2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+1/4*I*ln(c*x^2))^2,x)

[Out]

(1/4*x+5/2*x*tan(1/2*a+1/8*I*ln(c*x^2))^2+1/4*x*tan(1/2*a+1/8*I*ln(c*x^2))^4-1/8*x*ln(c*x^2)+3/4*x*ln(c*x^2)*t
an(1/2*a+1/8*I*ln(c*x^2))^2-1/8*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(c*x^2))^4-1/2*I*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(
c*x^2))+1/2*I*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(c*x^2))^3)/(1+tan(1/2*a+1/8*I*ln(c*x^2))^2)^2

________________________________________________________________________________________

Maxima [A]  time = 1.02164, size = 65, normalized size = 1.23 \begin{align*} \frac{4 \, c x -{\left (c x^{2}{\left (\cos \left (2 \, a\right ) - i \, \sin \left (2 \, a\right )\right )} +{\left (2 \, \cos \left (2 \, a\right ) + 2 i \, \sin \left (2 \, a\right )\right )} \log \left (x\right )\right )} \sqrt{c}}{8 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="maxima")

[Out]

1/8*(4*c*x - (c*x^2*(cos(2*a) - I*sin(2*a)) + (2*cos(2*a) + 2*I*sin(2*a))*log(x))*sqrt(c))/c

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin ^{2}{\left (a + \frac{i \log{\left (c x^{2} \right )}}{4} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*ln(c*x**2))**2,x)

[Out]

Integral(sin(a + I*log(c*x**2)/4)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.26885, size = 43, normalized size = 0.81 \begin{align*} \frac{1}{2} \, x - \frac{c^{\frac{3}{2}} x^{2} e^{\left (-2 i \, a\right )} + 2 \, \sqrt{c} e^{\left (2 i \, a\right )} \log \left (x\right )}{8 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="giac")

[Out]

1/2*x - 1/8*(c^(3/2)*x^2*e^(-2*I*a) + 2*sqrt(c)*e^(2*I*a)*log(x))/c